<?php
	
	require_once("fta.201003310000/fta.php");
	fta_registerModules(
		array(
		"cms.201003310000/config/cmsConfig",//we will deprecate the old cms config soon..
		"site/fta/config",
		"site/components/MAITutors",
	));	
	
	$urlfragment = extractStringWithKeyFromArray("urlfragment", $_REQUEST, null);
	//Need to default it to top one if not set or another page.
	if(is_null($urlfragment)){
		header('location: /Tutors/');
	} else {
		$urlfragment = urlFragmentCleanRestore($urlfragment);
	}
	
	//echo "Url fragment = '" . $urlfragment . "' ";
	
	// /*
	//need to redirect if no type found
	$o = mai_getSharedTutorsObject();
	$tutor = $o->getTutorByUrlFragment($urlfragment);
	if($tutor == false){
		header('location: /Tutors/');
	}
	$tutor = $o->tutor;
	
	// */
	
	//echo "Artwork = <pre>";print_r($o->artwork);echo "</pre>";
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="Keywords" content="<?php echo $o->tutor->keywords; ?>" />
<meta name="Description" content="<?php echo $o->tutor->description; ?>" />

<title><?php #echo $o->tutor->title; ?>Name - Tutor | Mairangi Arts Centre</title>

<?php include ("includes/external-files.php"); ?>

<?php include ("includes/analytics.php"); ?>
</head>

<body id="tutors" class="detail">



<?php include ("includes/head.php"); ?>





<div id="container">


    <div id="content">

        <h1>About Us - <?php echo $tutor->title; ?></h1>


            <img src="/html/blob.php?documentCode=<?php echo $tutor->documentcode; ?>&elementId=<?=TUTOR_IMAGE_FIELDID?>&filetypecode=2" alt="<?php echo $tutor->title; ?>" class="tutor-photo">


            <div id="content-blocks">


                    <?php //echo mai_renderTutor(); ?>
                    <div class="content-block block1 first-block">
                        <h2>Creative Background</h2>
                        <?php echo $tutor->organisationalname; ?>
					
                    </div><!-- Content-block ends -->


                    <div class="content-block block1 first-block">
                        <h2>Teaching Philosophy</h2>
                        <?php echo $tutor->address; ?>
                    </div><!-- Content-block ends -->

            </div><!-- Content-block ends -->

        </div><!-- Content-blocks ends -->






    <div id="sub-nav">
        <ul id="sub-nav-list" class="sub-nav-tutors">
            <li><h3><a href="/Tutors/">Tutors</a></h3>
           
                <ul>
					<?$list = $o->getTutors();
					foreach($list as $tutor){
					$detailUrl = urlFragmentClean($tutor->title);
					?>
                    <li><a href="/Tutors/<?=$detailUrl?>/"><?=$tutor->title?></a></li>
                    <?}?>
                    <?/*<li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>
                    <li><a href="">Tutor Name</a></li>*/?>
                </ul>
            </li>
        </ul>
    </div>



    </div><!-- Content ends -->









</div><!-- Container ends -->





<?php include ("includes/foot.php"); ?>





</body>

</html>
